import gl
import sys
print(sys.version)
print(gl.version())
gl.resetdefaults()

# Open background image
# Amend source as needed
gl.loadimage('C:/Users/mlw/Desktop/MRIcroGL/Resources/standard/mni152.nii.gz')

# Turn off smoothing
gl.overlayloadsmooth(0)

# Glass brain settings
gl.shadername('Glass')
gl.shaderadjust('boundThresh', 0.38)
gl.shaderadjust('boundBrightness',0.8)
gl.shaderadjust('shaderquality1to10', 6)


# Load overlays (Amend source as needed)
gl.overlayload('C:/Users/mlw/Dropbox (Personal)/Projects_Berkeley/CBMA_IO/ReproVersion_IO/k50_13_Amyg_Hipp_2mm.nii.gz')
gl.overlayload('C:/Users/mlw/Dropbox (Personal)/Projects_Berkeley/CBMA_IO/ReproVersion_IO/T_RA_thresh.nii.gz')

# Set overlay display parameters; 1 indicates 1st overlay
gl.colorname(1,"Grayscale")
gl.colorname(2,"Grayscale")

# Grayscale
gl.minmax(1,0,1)
gl.minmax(2,1,5)

# Overlay blending
# gl.overlayadditiveblending(1)

# Set the color bar options 
gl.colorbarposition(0)

# Set the background color
gl.backcolor(255,255,255)

# Change brain layer opacity 
gl.opacity(0,75)

# Shift the camera angle
gl.azimuthelevation(150, 0)

# Save the image 
#gl.savebmp('Figure 3.png')
